//
// Copyright (C) 2011 - 2013  Steve Channell steve.channell@cepheis.com
//
// This file is part of Cephei.QL, an open-source library wrapper 
// arround QuantLib http://quantlib.org/
//
// Cephei.QL is open source software: you can redistribute it and/or modify it
// under the terms of the license.  You should have received a
// copy of the license along with this program; if not, please email
// <support@cepheis.com>. The license is also available online at
// <http://cepheis.com/license.htm>.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the license for more details.
//
// Version 2.2 with QuantLib 1.2.1
//#include "stdafx.h"
#include "CubicSplineOvershootingMinimization1.h"
using namespace Cephei::QL::Math::Interpolations;
#include <gen/QL/Math/Interpolations/CubicInterpolation.h>
#undef HANDLE
#undef ABSTRACT
#undef STRUCT
Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::CCubicSplineOvershootingMinimization1 (boost::shared_ptr<QuantLib::CubicSplineOvershootingMinimization1>& childNative, Object^ owner) : CCubicInterpolation(CCubicSplineOvershootingMinimization1::typeid)
{
#ifdef HANDLE
	_phCubicSplineOvershootingMinimization1 = NULL;
#endif
	_ppCubicSplineOvershootingMinimization1 = &childNative;
    _ppCubicInterpolation = new boost::shared_ptr<QuantLib::CubicInterpolation> (boost::dynamic_pointer_cast<QuantLib::CubicInterpolation> (*_ppCubicSplineOvershootingMinimization1));
}
Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::CCubicSplineOvershootingMinimization1 (QuantLib::CubicSplineOvershootingMinimization1& childNative, Object^ owner) : CCubicInterpolation(CCubicSplineOvershootingMinimization1::typeid)
{
#ifdef HANDLE
	_phCubicSplineOvershootingMinimization1 = NULL;
#endif
	_ppCubicSplineOvershootingMinimization1 = new boost::shared_ptr<QuantLib::CubicSplineOvershootingMinimization1> (&childNative);
    _ppCubicInterpolation = new boost::shared_ptr<QuantLib::CubicInterpolation> (boost::dynamic_pointer_cast<QuantLib::CubicInterpolation> (*_ppCubicSplineOvershootingMinimization1));
    _CubicSplineOvershootingMinimization1Owner = owner;
    _CubicInterpolationOwner = owner;
}

Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::CCubicSplineOvershootingMinimization1 (CCubicSplineOvershootingMinimization1^ copy) : CCubicInterpolation(CCubicSplineOvershootingMinimization1::typeid)
{
#ifdef HANDLE
	_phCubicSplineOvershootingMinimization1 = NULL;
#endif
	if (copy->HasNative() != NULL)
    {
		_ppCubicSplineOvershootingMinimization1 = new boost::shared_ptr<QuantLib::CubicSplineOvershootingMinimization1> (copy->GetShared());
        _ppCubicInterpolation = new boost::shared_ptr<QuantLib::CubicInterpolation> (boost::dynamic_pointer_cast<QuantLib::CubicInterpolation> (*_ppCubicSplineOvershootingMinimization1));
    }
}
Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::CCubicSplineOvershootingMinimization1 (PLATFORM::Type^ t) : CCubicInterpolation(CCubicSplineOvershootingMinimization1::typeid)
{
#ifdef HANDLE
	_phCubicSplineOvershootingMinimization1 = NULL;
#endif
	if (!t->IsSubclassOf(CCubicSplineOvershootingMinimization1::typeid))
		throw REFNEW Exception ("Invalid base-case init");
}
#ifdef HANDLE
Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::CCubicSplineOvershootingMinimization1 (QuantLib::Handle<QuantLib::CubicSplineOvershootingMinimization1>& childNative, Object^ owner)  : CCubicInterpolation(CCubicSplineOvershootingMinimization1::typeid)
{
	_phCubicSplineOvershootingMinimization1 = &childNative;
	_ppCubicSplineOvershootingMinimization1 = &static_cast<boost::shared_ptr<QuantLib::CubicSplineOvershootingMinimization1>>(childNative.currentLink());
    _ppCubicInterpolation = new boost::shared_ptr<QuantLib::CubicInterpolation> (boost::dynamic_pointer_cast<QuantLib::CubicInterpolation> (*_ppCubicSplineOvershootingMinimization1));
    _CubicSplineOvershootingMinimization1Owner = owner;
}
Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::CCubicSplineOvershootingMinimization1 (QuantLib::Handle<QuantLib::CubicSplineOvershootingMinimization1> childNative)  : CCubicInterpolation(CCubicSplineOvershootingMinimization1::typeid)
{
	_phCubicSplineOvershootingMinimization1 = &childNative;
	_ppCubicSplineOvershootingMinimization1 = &static_cast<boost::shared_ptr<QuantLib::CubicSplineOvershootingMinimization1>>(childNative.currentLink());
    _ppCubicInterpolation = new boost::shared_ptr<QuantLib::CubicInterpolation> (boost::dynamic_pointer_cast<QuantLib::CubicInterpolation> (*_ppCubicSplineOvershootingMinimization1));
}
#endif
#ifdef STRUCT
Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::CCubicSplineOvershootingMinimization1 (QuantLib::CubicSplineOvershootingMinimization1 childNative)  : CCubicInterpolation(CCubicSplineOvershootingMinimization1::typeid)
{
#ifdef HANDLE
	_phCubicSplineOvershootingMinimization1 = NULL;
#endif
	_ppCubicSplineOvershootingMinimization1 = new boost::shared_ptr<QuantLib::CubicSplineOvershootingMinimization1> (new QuantLib::CubicSplineOvershootingMinimization1 (childNative));
    _ppCubicInterpolation = new boost::shared_ptr<QuantLib::CubicInterpolation> (boost::dynamic_pointer_cast<QuantLib::CubicInterpolation> (*_ppCubicSplineOvershootingMinimization1));
}
#endif

Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::~CCubicSplineOvershootingMinimization1 ()
{
    if (_ppCubicSplineOvershootingMinimization1 != NULL)
    {
	    delete _ppCubicSplineOvershootingMinimization1;
        _ppCubicSplineOvershootingMinimization1 = NULL;
    }
}
Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::!CCubicSplineOvershootingMinimization1 ()
{
    if (_ppCubicSplineOvershootingMinimization1 != NULL)
    {
	    delete _ppCubicSplineOvershootingMinimization1;
    }
}
QuantLib::CubicSplineOvershootingMinimization1& Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::GetReference ()
{
    if (_ppCubicSplineOvershootingMinimization1 == NULL) throw REFNEW NativeNullException ();
	return **_ppCubicSplineOvershootingMinimization1;
}
boost::shared_ptr<QuantLib::CubicSplineOvershootingMinimization1>& Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::GetShared ()
{
    if (_ppCubicSplineOvershootingMinimization1 == NULL) throw REFNEW NativeNullException ();
	return *_ppCubicSplineOvershootingMinimization1;
}
QuantLib::CubicSplineOvershootingMinimization1* Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::GetPointer ()
{
    if (_ppCubicSplineOvershootingMinimization1 == NULL) throw REFNEW NativeNullException ();
	return &**_ppCubicSplineOvershootingMinimization1;
}
#ifdef HANDLE
QuantLib::Handle<QuantLib::CubicSplineOvershootingMinimization1>& Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::GetHandle ()
{
	if (_phCubicSplineOvershootingMinimization1 == NULL)
	{
		_phCubicSplineOvershootingMinimization1 = new Handle<QuantLib::CubicSplineOvershootingMinimization1> (*_ppCubicSplineOvershootingMinimization1);
	}
	return *_phCubicSplineOvershootingMinimization1;
}
#endif
bool Cephei::QL::Math::Interpolations::CCubicSplineOvershootingMinimization1::HasNative () 
{
	return (_ppCubicSplineOvershootingMinimization1 != NULL);
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Factory class

